""" 
按键1 检查
按下时点亮LED1
"""

# 导入Pin模块
from machine import Pin
import time

key1 = Pin(14, Pin.IN, Pin.PULL_UP)
led1 = Pin(15, Pin.OUT)

print("relay start")
while True:
    if key1.value() == 0:
        led1.value(1)
    else:
        led1.value(0)
    time.sleep(0.1)
print("relay end")
